#define _CRT_SECURE_NO_WARNINGS 1
#include"Sort.h"
void test1()
{
	int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	InsertSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test2()
{
	int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	ShellSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test3()
{
	int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	SelectSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test4()
{int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };
	
	//int a[] = { 5,32,56,3,21,67 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	HeapSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test5()
{
	//int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };

	int a[] = { 5,32,56,3,21,67 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	BubbleSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test6()
{
	//int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };

	int a[] = { 10,9,8,7,6,5,4,3,2,1 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	QuickSort(a, 0,sizeof(a) / sizeof(a[0])-1);
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test7()
{
	int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };

	//int a[] = { 5,32,56,3,21,67 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	MergeSortNoR(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
void test8()
{
	int a[] = { 182,3963,226614,5899,3322,106709,839,8205,10179,4668,4428,15330,1225,39399,5420,6514,925,23855,2941,3510,4053,2244,16692,1277,1480,11149,77951,3476,12037,1888,3099,6220,57519,2454,94540,4620,2012,1991,2311,610,12433,6314,18317,7575,2529 };

	//int a[] = { 5,32,56,3,21,67 };
	PrintArray(a, sizeof(a) / sizeof(a[0]));
	CountSort(a, sizeof(a) / sizeof(a[0]));
	PrintArray(a, sizeof(a) / sizeof(a[0]));
}
int main()
{
	//test1();
	//test2();
	//test3();
	//test4();
	//test5();
	//test6();
	//test7();
	test8();
	return 0;
}